---
layout: m1x_soap
title: Gift Card List
---

<h3><a name="cart_giftcard.list-Module%3AGiftCardAPI"></a>Module: GiftCard API</h3>

<h4><a name="cart_giftcard.list-Resource%3Acartgiftcard"></a>Resource: cart_giftcard</h4>


<h5><a name="cart_giftcard.list-Method%3A"></a>Method:</h5>

<ul>
	<li>cart_giftcard.list (SOAP V1)</li>
	<li>shoppingCartGiftcardList (SOAP V2)</li>
</ul>


<p>Allows you to retrieve the list of gift cards used in the shopping cart (quote).</p>

<p><b>Arguments:</b></p>

<table><tbody>
<tr>
<th> Type </th>
<th> Name </th>
<th> Description </th>
</tr>
<tr>
<td> string </td>
<td> sessionId </td>
<td> Session ID </td>
</tr>
<tr>
<td> string </td>
<td> quoteId </td>
<td> Shopping cart ID (quote ID) </td>
</tr>
<tr>
<td> string </td>
<td> storeId </td>
<td> Store ID (optional) </td>
</tr>
</tbody></table>


<p><b>Return:</b></p>

<table><tbody>
<tr>
<th> Type </th>
<th> Name </th>
<th> Description </th>
</tr>
<tr>
<td> array </td>
<td> result </td>
<td> Array of enterpriseGiftcardaccountListEntity </td>
</tr>
</tbody></table>


<p>The <b>enterpriseGiftcardaccountListEntity</b> content is as follows:</p>

<table><tbody>
<tr>
<th> Type </th>
<th> Name </th>
<th> Description </th>
</tr>
<tr>
<td> string </td>
<td> giftcardaccount_id </td>
<td> Gift card account ID </td>
</tr>
<tr>
<td> string <br class="atl-forced-newline" /> </td>
<td> code <br class="atl-forced-newline" /> </td>
<td> Gift card code </td>
</tr>
<tr>
<td> string <br class="atl-forced-newline" /> </td>
<td> used_amount <br class="atl-forced-newline" /> </td>
<td> Used amount (in store currency) </td>
</tr>
<tr>
<td> string <br class="atl-forced-newline" /> </td>
<td> base_amount <br class="atl-forced-newline" /> </td>
<td> Base amount (in base currency) </td>
</tr>
</tbody></table>


<p><b>Faults:</b></p>


<table><tbody>
<tr>
<th> Fault Code </th>
<th> Fault Message </th>
</tr>
<tr>
<td> 1001 </td>
<td> Can not make operation because store is not exists </td>
</tr>
<tr>
<td> 1002 </td>
<td> Can not make operation because quote is not exists </td>
</tr>
</tbody></table>


<h4><a name="cart_giftcard.list-Examples"></a>Examples</h4>

<h5><a name="cart_giftcard.list-RequestExampleSOAPV1"></a>Request Example SOAP V1</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div id="root">
		<pre class="theme: Default; brush: php; gutter: false">$proxy = new SoapClient('http://magentohost/api/soap/?wsdl');
$sessionId = $proxy-&gt;login('apiUser', 'apiKey');

$quoteId = 15;

$giftcardList = $proxy-&gt;call(
    $sessionId,
    "cart_giftcard.list",
    array(
         $quoteId
    )
);</pre>
		</div>
</div></div>



<h5><a name="cart_giftcard.list-RequestExampleSOAPV2"></a>Request Example SOAP V2</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div id="root">
		<pre class="theme: Default; brush: php; gutter: false">$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl'); // TODO : change url
$sessionId = $proxy-&gt;login('apiUser', 'apiKey'); // TODO : change login and pwd if necessary

$result = $proxy-&gt;shoppingCartGiftcardList($sessionId, '15');
var_dump($result);</pre>
		</div>
</div></div>



<h5><a name="cart_giftcard.list-RequestExampleSOAPV2%28WSIComplianceMode%29"></a>Request Example SOAP V2 (WS-I Compliance Mode)</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div id="root">
		<pre class="theme: Default; brush: php; gutter: false">$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl'); 

$sessionId = $proxy-&gt;login((object)array('username' =&gt; 'apiUser', 'apiKey' =&gt; 'apiKey')); 
 
$result = $proxy-&gt;shoppingCartGiftcardList((object)array('sessionId' =&gt; $sessionId-&gt;result, 'quoteId' =&gt; '15', 'storeId' =&gt; '3'));   

var_dump($result-&gt;result);</pre>
		</div>
</div></div>






<h5><a name="cart_giftcard.list-ResponseExampleSOAPV1"></a>Response Example SOAP V1</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div id="root">
		<pre class="theme: Default; brush: php; gutter: false">array
  0 =&gt;
    array
      'giftcardaccount_id' =&gt; string '5' (length=1)
      'code' =&gt; string 'code' (length=12)
      'used_amount' =&gt; float 141.34
      'base_amount' =&gt; string '200.0000' (length=8)
  1 =&gt;
    array
      'giftcardaccount_id' =&gt; string '6' (length=1)
      'code' =&gt; string 'code' (length=12)
      'used_amount' =&gt; float 35.34
      'base_amount' =&gt; string '50.0000' (length=7)</pre>
		</div>
</div></div>


<?php include(__ROOT__ . 'footer.php'); ?>
